import request from '@/utils/request'

// 查询触发器列表
export function listTrigger(query) {
  return request({
    url: '/toolkit/trigger/list',
    method: 'get',
    params: query
  })
}

export function  listEntity(){
  return request({
    url: '/toolkit/trigger/listEntity',
    method: 'get',
  })
}

// 查询触发器详细
export function getTrigger(id) {
  return request({
    url: '/toolkit/trigger/' + id,
    method: 'get'
  })
}

// 新增触发器
export function addTrigger(data) {
  return request({
    url: '/toolkit/trigger/save',
    method: 'post',
    data: data
  })
}

// 修改触发器
export function editTrigger(data) {
  return request({
    url: '/toolkit/trigger/update',
    method: 'put',
    data: data
  })
}

// 删除触发器
export function delTrigger(id) {
  return request({
    url: '/toolkit/trigger/remove/' + id,
    method: 'delete'
  })
}


// 导出触发器
export function exportTrigger(query) {
  return request({
    url: '/toolkit/trigger/export',
    method: 'get',
    params: query
  })
}
